#include<stdio.h>
#include<unistd.h>

int MAX_CUT = 0;

int main()
{
    
    while(1)
    {
        pid_t id = fork();
        if(id < 0)
        {
            printf("fork err::%d\n",MAX_CUT);
            break;
        }
        if(id == 0)
        {
            //child:
            while(1)
            {
                sleep(1);
            }
        }
        else{
            //father
        }
        MAX_CUT++;
    }
    return 0;
}

